package nowCoder;

import java.util.Scanner;

public class HJ30 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String x = in.next();
        String y = in.next();
        String z = x+y;
        char[] zz = z.toCharArray();
        for (int i = 0; i < zz.length; i++) {
            for (int j = i+2; j < zz.length;) {
                if (zz[i] > zz[j]){
                    char temp = zz[i];
                    zz[i] = zz[j];
                    zz[j] = temp;
                }
                j+=2;
            }
        }
        StringBuilder sb = new StringBuilder();
        for (char c : zz) {
            sb.append(x(String.valueOf(c)));
        }
        System.out.println(sb);
    }
    public static String x(String s){
        try {
            int i = Integer.parseInt(s, 16);
            String bs = Integer.toBinaryString(i);
            char[] ii;
            if(bs.length() == 4){
                ii = bs.toCharArray();
            }else{
                ii = new char[]{'0','0','0','0'};
                for (int j = 0; j < bs.length(); j++) {
                    ii[j+4-bs.length()] = bs.charAt(j);
                }
            }
            String sb = new String(new char[]{ii[3],ii[2],ii[1],ii[0]});
            return Integer.toUnsignedString(Integer.parseInt(sb, 2),16).toUpperCase();
        }catch (Exception e){
            return s;
        }
    }
}
